//
//  AnalysisJson.h
//  Finance
//
//  Created by cheng xiang on 13-4-8.
//  Copyright (c) 2013年 cheng xiang. All rights reserved.
//
//模板式解析json，直接将对象的属性与json的key对应，解析的字符串直接赋值给对象，以对象数组的形式返回
#import <Foundation/Foundation.h>
#import "AppDelegate.h"

@interface AnalysisJson : NSObject
//通过key传给object的属性，返回object
+ (id) analysisJsonToObject:(Class) objectClass fromJsonStr: (NSString *)jsonStr;

//通过key找对应value，返回string
+ (NSString *) analysisJsonToString: (NSString *)keyStr fromJsonStr: (NSString *)jsonStr;

//通过object组装json
+ (NSString *) PackageJsonFromObject: (id)data;

//组成header的统一入口
+ (NSDictionary *) PackageJsonHeader: (NSString *)transtype;

//组成报文
+ (NSData *) PackageJsonFromHeader: (NSDictionary *)header andBody:(NSDictionary *)body;
@end
